
import { Switch, Route } from 'react-router-dom'
import Home from './core/Home'
import Shop from './core/Shop'
import Signup from './core/Signup'
import Signin from './core/Signin'
import UserDashboard from './admin/UserDashboard'
import AdminDashboard from './admin/AdminDashboard'
import PrivateAdmin from './admin/privateAdmin'
import PrivateUser from './admin/privateUser'
import AddCategory from './admin/addCategory'
import AddProduct from './admin/AddProduct'
import ProductDetail from './core/ProductDetail'
import Cart from './core/Car'
import Order from './admin/Order'


 function Routes() {
  return (
    <Switch>
      <Route path='/' component={Home} exact/>
      <Route path='/shop' component={Shop} />
      <Route path='/signin' component={Signin} />
      <Route path='/signup' component={Signup} />
      <Route path='/cart' component={Cart} />
      <PrivateUser path='/user/dashboard' component={UserDashboard} />  
      <PrivateAdmin path='/admin/dashboard' component={AdminDashboard} />
      <PrivateAdmin  path='/add/category' component={AddCategory} />
      <PrivateAdmin  path='/add/product' component={AddProduct} />
      <PrivateAdmin  path='/admin/order' component={Order} />
      <Route path='/productdetail/:productId' component={ProductDetail} />
    </Switch>
  )
}
export default Routes
